﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Assignment.aspx.cs" Inherits="CRM.Web.ClaimFormManage.Assignment" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/Common.js"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $(".cbAll").live("click", function() {
                if ($(this).children().eq(0).attr("checked") == "checked") {
                    $(".cbItem").children().each(function() {
                        $(this).attr("checked", "checked");
                    });
                }
                else {
                    $(".cbItem").children().each(function() {
                        $(this).attr("checked", false);
                    });
                }
            });
        });
    </script>
    
    <style type="text/css">
        .assign
        {
            width: 100%;
            margin-top: 1px;
        }
        .assign td
        {
            border-top: #336699 1px solid;
        }
        .assign tr
        {
            border: #336699 1px solid;
            height: 22px;
            line-height: 22px;
        }
        .assign .title
        {
            background-color: #FFF3CA;
            width: 120px;
            text-align: right;
            line-height: 22px;
            border-right: #336699 1px solid;
        }
        .assign .content
        {
            white-space: nowrap;
        }
        .assign .content .txt
        {
        }
        .assign .content .txtlong
        {
            width: 600px;
        }
        .assign .content .ddl
        {
            min-width: 80px;
        }
        .assign .content .tips
        {
            color: Red;
        }
        .assign caption
        {
            font-size: 14px;
            font-weight: bold;
            margin: 0px 20px;
            text-align: left;
            height: 26px;
            line-height: 26px;
            color: #336699;
        }
        .gridview
        {
            margin: 2px;
        }
        .gridview .header
        {
            height: 28px;
            line-height: 28px;
            border: #3768b9 1px solid;
            font-size: 12px;
            background-color: #e7ebf1;
            text-align: left;
            padding-left: 5px;
            white-space: nowrap;
            margin-left: 5px;
        }
        .gridview .header th
        {
            border: #3768b9 1px solid;
            padding-left: 10px;
        }
        .gridview .row
        {
            height: 24px;
            line-height: 24px;
            background-color: #FFFFFF;
            border: #336699 1px solid;
        }
        .gridview .row td
        {
            border: #3768b9 1px solid;
        }
        .gridview .row2
        {
            height: 24px;
            line-height: 24px;
            border: #336699 1px solid;
            background-color: #FFF3CA;
        }
        .gridview .row2 td
        {
            border: #3768b9 1px solid;
        }
        .gridview .pager
        {
            margin-top: 10px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        <table border="0" cellpadding="0" cellspacing="0" id="tTitle">
            <tr>
                <td class="left">
                    <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
                </td>
                <td class="middle">
                    <div class="pagetitle">
                        <div>
                            <asp:Label ID="lblTitle" runat="server">索赔单分配</asp:Label></div>
                    </div>
                </td>
                <td class="right">
                    <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
                </td>
            </tr>
        </table>
    <div id="divMain" >
    <div style="width: 100%" id="tBodyMain">
    <table  cellpadding="0" cellspacing="0" style="width: 100%; border-bottom: #6699ff 1px solid; ">
        <tr>
            <td style="width: 300px; border-right: #6699ff 1px solid; vertical-align: top;">
                <table border="0" cellpadding="0" cellspacing="0" class="assign">
                    <caption>索赔单分配信息</caption>  
                    <tr >
                        <td  class="title">
                            分配部门：
                        </td>
                        <td class="content">                            
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <asp:DropDownList ID="ddlDepartment" runat="server" CssClass="ddl" 
                                AutoPostBack="True" onselectedindexchanged="ddlDepartment_SelectedIndexChanged"></asp:DropDownList>&nbsp;                                
                                </ContentTemplate>
                            </asp:UpdatePanel>    
                        </td>
                    </tr>  
                    <tr >
                        <td class="title">
                            未分配数：
                        </td>
                        <td class="content">
                            &nbsp;<asp:Label runat="server" ID="lblClaimFormCount" Style="color: Red; "></asp:Label>&nbsp;
                        </td>
                    </tr>
                    <tr style="display: none;" >
                        <td class="title" >
                            分配方式：
                        </td>
                        <td class="content">
                            <asp:RadioButton ID="rbAssignMode1" runat="server" GroupName="rbAssignMode" Text="固定分配" Checked="true" />
                        </td>
                    </tr>
                    <tr >
                        <td  class="title">
                            &nbsp;每人分配数：
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtAssignCount" runat="server" CssClass="txt" MaxLength="5" onkeyup="isPositiveInteger(this);" onbeforepaste="isClipboardPositiveInteger();" ></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvAssignCount" runat="server" ErrorMessage="*" Display="Dynamic" ControlToValidate="txtAssignCount" Enabled="True"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr >
                        <td  class="title">
                            &nbsp;
                        </td>
                        <td class="content">
                        </td>
                    </tr>                      
                    <tr >
                        <td  class="title">
                            &nbsp;
                        </td>
                        <td class="content">
                            <asp:Button runat="server" ID="btnAssign" CommandName="Assign" Text="分配" 
                                onclick="btnAssign_Click" CssClass="btn" ></asp:Button>
                        </td>
                    </tr>   
                    <tr style="height: 100%; line-height: 100%;">
                        <td  class="title" >
                        </td>
                        <td class="content">
                        </td>
                    </tr>             
                </table>
            </td>
            <td style="width: auto; border-right: #336699 1px solid;  vertical-align: top; ">
                <table border="0" cellpadding="0" cellspacing="0" class="assign">
                    <caption>用户信息</caption>
                    <tr>
                        <td class="content">
                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                <ContentTemplate>
                                    <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" AutoGenerateColumns="False"  
                                       Width="100%" SortExpressionValue="LOGINNAME">
                                        <Columns> 
                                            <asp:TemplateField>
			                                    <HeaderTemplate>			                
                                                    <asp:CheckBox ID="cbAll" CssClass="cbAll" runat="server"  />
			                                    </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="cbItem" CssClass="cbItem" runat="server" />
                                                </ItemTemplate>
                                                <ItemStyle Width="28px" HorizontalAlign="Center" />
                                                <HeaderStyle Width="28px" HorizontalAlign="Left"  />
                                            </asp:TemplateField>
			                                <asp:BoundField DataField="LOGINNAME" HeaderText="登录名"  >
			                                <HeaderStyle Width="100px" />
                                            </asp:BoundField>
			                                <asp:BoundField DataField="USERNAME" HeaderText="姓名"  >
			                                <HeaderStyle Width="100px" />
                                            </asp:BoundField>
			                                <asp:TemplateField HeaderText="">
                                                <ItemTemplate>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>	
                                        <RowStyle CssClass="row" />
                                        <AlternatingRowStyle CssClass="row2" />
                                        <HeaderStyle CssClass="header" />	
                                        <PagerStyle CssClass="pager" />	
                                    </dp:WebGridView>                                
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="ddlDepartment" 
                                        EventName="SelectedIndexChanged" />
                                </Triggers>
                            </asp:UpdatePanel>    
                        </td>                        
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </div>
    </div>
    </form>
</body>
</html>
